<template>
  <!-- <div class="textbox" :class="color">
    <span>{{ myCount }}</span>
  </div> -->
  <div class="textbox" :class="color">
    <span>{{ myCount }}</span>
  </div>
</template>

<script>
export default {
  name: "onLine",
  props: {
    color: {
      type: String,
      default: "",
    },
    sum: {
      type: Number,
    },
  },
  mounted() {},
  computed: {
    myCount: function () {
      return this.myfun.myformat(this.sum);
    },
  },
};
</script>

<style scoped lang="scss">
.textbox {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: #f0f6fb;
  box-sizing: border-box;
  padding: 0px 2px;
  
  span {
    text-align: center;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1;
    &:nth-child(1) {
      font-size: 20px;
    }
    &:nth-child(2) {
      margin-top: 8px;
      font-size: 14px;
    }
  }
}
.stay {
  
  background: url("../../assets/images/stay.png") no-repeat center;
  background-size: cover;
}
.leave {
  background: url("../../assets/images/leave.png") no-repeat center;
  background-size: cover;
}
</style>
